package com.power.flowable.model;


import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
*  流程标准按钮实体类
*/

@Entity
@ApiModel(value="流程标准按钮")
@Data
@Table(name="Act_dsn_btn")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Act_dsn_btn.Act_dsn_btnPK.class) 用于复合组件
public class Act_dsn_btn extends BaseModel implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
    @Id
    @Setter(AccessLevel.NONE)
    private String id;

    @ApiModelProperty(value = "分组")
    private Integer group_;

    @ApiModelProperty(value = "按钮文字")
    private String text_;

    @ApiModelProperty(value = "按钮样式")
    private String class_;

    @ApiModelProperty(value = "按钮图标")
    private String icon_;

    @ApiModelProperty(value = "按钮事件")
    private String click_;

    @ApiModelProperty(value = "顺序")
    private Integer indexsort;

    @ApiModelProperty(value = "是否启用")
    private Integer enable_;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("group_", this.getGroup_());
        map.put("text", this.getText_());
        map.put("class_", this.getClass_());
        map.put("icon_", this.getIcon_());
        map.put("click_", this.getClick_());
        map.put("indexsort", this.getIndexsort());
        map.put("enable_", this.getEnable_());
        return map;
    }

    public Serializable getPrimaryKey() {
        return id;
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;
    }

	@Override
	public Serializable getId() {
		return id;
	}

	@Override
	public void setId(Serializable id) {
		this.id = (String) id;
	}

}